When moving from gtk_container_forall to the widget dom
api, we are now iterating over all children of the listbox,
including headers, separators, etc. So, skip everything
that is not a listboxrow, to make the tests work again.
row != NULL;
row = gtk_widget_get_next_sibling (row))
{
+ if (!GTK_IS_LIST_BOX_ROW (row))
+ continue;
+
index = gtk_list_box_row_get_index (GTK_LIST_BOX_ROW (row));
label = gtk_list_box_row_get_child (GTK_LIST_BOX_ROW (row));
value = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (label), "data"));
row != NULL;
row = gtk_widget_get_next_sibling (row))
{
+ if (!GTK_IS_LIST_BOX_ROW (row))
+ continue;
+
if (gtk_widget_get_child_visible (row))
count++;
}
row != NULL;
row = gtk_widget_get_next_sibling (row))
{
+ if (!GTK_IS_LIST_BOX_ROW (row))
+ continue;
+
if (gtk_list_box_row_get_header (GTK_LIST_BOX_ROW (row)) != NULL)
count++;
}